﻿using System;
using System.ComponentModel;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace BusinessLogic
{
   public class Checkin
    {
       public static int AddPerson(string roomID, string roomType, string roomPrice,string personName,string personID,string personSex,string checkinDate,string roomStatus)
       {
           //if (DataAccess.RM.IsRoomExist(roomID))
           //{
           //    MessageBox.Show("Room already exists!");
           //    return 0;
           //}
           //DataAccess.RM _rm = new DataAccess.RM();
           DataAccess.Checkin _ck = new DataAccess.Checkin();
           _ck.roomID = roomID;
           _ck.roomType = roomType;
           _ck.roomPrice = Convert.ToDouble(roomPrice);
           _ck.personName = personName;
           _ck.personID = personID;
           _ck.Sex = personSex;
           _ck.checkTime = checkinDate;
           _ck.roomStatus = roomStatus;
           int result = DataAccess.Checkin.AddPerson(_ck);

           return result;
       }


       public static int updateroom()
       {
           int result = DataAccess.Checkin.updateroom();
           return result;
       }
    }
}
